-module(pg_math).

-export([pow10/1]).

pow10(0) -> 1;
pow10(1) -> 10;
pow10(2) -> 100;
pow10(3) -> 1000;
pow10(4) -> 10000;
pow10(5) -> 100000;
pow10(6) -> 1000000;
pow10(7) -> 10000000;
pow10(8) -> 100000000;
pow10(9) -> 1000000000;
pow10(10) -> 10000000000;
pow10(11) -> 100000000000;
pow10(12) -> 1000000000000;
pow10(13) -> 10000000000000;
pow10(14) -> 100000000000000;
pow10(15) -> 1000000000000000;
pow10(16) -> 10000000000000000;
pow10(17) -> 100000000000000000;
pow10(18) -> 1000000000000000000;
pow10(19) -> 10000000000000000000;
pow10(20) -> 100000000000000000000;
pow10(21) -> 1000000000000000000000;
pow10(22) -> 10000000000000000000000;
pow10(23) -> 100000000000000000000000;
pow10(24) -> 1000000000000000000000000;
pow10(25) -> 10000000000000000000000000;
pow10(26) -> 100000000000000000000000000;
pow10(27) -> 1000000000000000000000000000;
pow10(28) -> 10000000000000000000000000000;
pow10(29) -> 100000000000000000000000000000;
pow10(30) -> 1000000000000000000000000000000;
pow10(31) -> 10000000000000000000000000000000;
pow10(32) -> 100000000000000000000000000000000;
pow10(33) -> 1000000000000000000000000000000000;
pow10(34) -> 10000000000000000000000000000000000;
pow10(35) -> 100000000000000000000000000000000000;
pow10(36) -> 1000000000000000000000000000000000000;
pow10(37) -> 10000000000000000000000000000000000000;
pow10(38) -> 100000000000000000000000000000000000000;
pow10(39) -> 1000000000000000000000000000000000000000;
pow10(40) -> 10000000000000000000000000000000000000000;
pow10(41) -> 100000000000000000000000000000000000000000;
pow10(42) -> 1000000000000000000000000000000000000000000;
pow10(43) -> 10000000000000000000000000000000000000000000;
pow10(44) -> 100000000000000000000000000000000000000000000;
pow10(45) -> 1000000000000000000000000000000000000000000000;
pow10(46) -> 10000000000000000000000000000000000000000000000;
pow10(47) -> 100000000000000000000000000000000000000000000000;
pow10(48) -> 1000000000000000000000000000000000000000000000000;
pow10(49) -> 10000000000000000000000000000000000000000000000000;
pow10(50) -> 100000000000000000000000000000000000000000000000000;
pow10(51) -> 1000000000000000000000000000000000000000000000000000;
pow10(52) -> 10000000000000000000000000000000000000000000000000000;
pow10(53) -> 100000000000000000000000000000000000000000000000000000;
pow10(54) -> 1000000000000000000000000000000000000000000000000000000;
pow10(55) -> 10000000000000000000000000000000000000000000000000000000;
pow10(56) -> 100000000000000000000000000000000000000000000000000000000;
pow10(57) -> 1000000000000000000000000000000000000000000000000000000000;
pow10(58) -> 10000000000000000000000000000000000000000000000000000000000;
pow10(59) -> 100000000000000000000000000000000000000000000000000000000000;
pow10(60) -> 1000000000000000000000000000000000000000000000000000000000000;
pow10(61) -> 10000000000000000000000000000000000000000000000000000000000000;
pow10(62) -> 100000000000000000000000000000000000000000000000000000000000000;
pow10(63) -> 1000000000000000000000000000000000000000000000000000000000000000;
pow10(64) -> 10000000000000000000000000000000000000000000000000000000000000000;
pow10(65) -> 100000000000000000000000000000000000000000000000000000000000000000;
pow10(66) -> 1000000000000000000000000000000000000000000000000000000000000000000;
pow10(67) -> 10000000000000000000000000000000000000000000000000000000000000000000;
pow10(68) -> 100000000000000000000000000000000000000000000000000000000000000000000;
pow10(69) -> 1000000000000000000000000000000000000000000000000000000000000000000000;
pow10(70) -> 10000000000000000000000000000000000000000000000000000000000000000000000;
pow10(71) -> 100000000000000000000000000000000000000000000000000000000000000000000000;
pow10(72) -> 1000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(73) -> 10000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(74) -> 100000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(75) -> 1000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(76) -> 10000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(77) -> 100000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(78) -> 1000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(79) -> 10000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(80) -> 100000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(81) -> 1000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(82) -> 10000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(83) -> 100000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(84) -> 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(85) -> 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(86) -> 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(87) -> 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(88) -> 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(89) -> 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(90) -> 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(91) -> 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(92) -> 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(93) -> 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(94) -> 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(95) -> 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(96) -> 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(97) -> 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(98) -> 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(99) -> 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
pow10(100) -> 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;

pow10(N) when N > 100 ->
    pow10(100) * pow10(N - 100).
